package mfuny.ggongal.admin;

import mfuny.ggongal.admin.gift.GiftCardDao;
import mfuny.ggongal.admin.gift.GiftCardService;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class GiftCardController {
	GiftCardService card;
	
	public GiftCardController() throws Exception {
		card = new GiftCardService();
	}
	
	
	@RequestMapping("/regGiftCardForm.ga")
	public ModelAndView regGiftCardForm() throws Exception {
		return card.regGiftCardForm();
	}
	
	@RequestMapping("/regGiftCard.ga")
	public ModelAndView regGiftCard(@ModelAttribute GiftCardDao cardDao) throws Exception {
		return card.regGiftCard(cardDao);
	}
	
	@RequestMapping("/giftCard.ga")
	public ModelAndView giftCard() throws Exception {
		return card.giftCard();
	}
}
